package net.jalisq.functions;

import net.jalisq.builder.Condition;
import net.jalisq.types.Expression;

public abstract class Operation implements Condition {
	
	private Expression lhand;
	private Expression rhand;
	
	public Operation(Expression lhand, Expression rhand) {
		this.lhand = lhand;
		this.rhand = rhand;
	}
	@Override
	public String getRepr() {
		return lhand.getRepr() + " " + getOpSymbol() + " " + rhand.getRepr();
	}
	
	protected abstract String getOpSymbol();
	
	@Override
	public Class<Boolean> getType() {
		return Boolean.class;
	}

}
